import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import SaleOut from '@/components/SaleOut'
import Sale from '@/components/Sale'
import SaveNumberChart from '@/components/SaveNumberChart'
import SaleNumberChart from '@/components/SaleNumberChart'
import SaleDayChart from '@/components/SaleDayChart'

import MiniAlert from '@/components/MiniAlert'
import MaxAlert from '@/components/MaxAlert'

import ExpireAlert from '@/components/ExpireAlert'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/Home',
      name: 'Home',
      component: Home,
      children: [
        {
          path: '',
          redirect: '/SaleOut'
        },
        // 销售出库分析报表
        { path: '/SaleOut', name: 'SaleOut', component: SaleOut },
        //产品销售出库分析报表
        { path: '/Sale', name: 'Sale', component: Sale }
      ]
    },
    //销售量分析图表
    {path:'/SaleNumberChart',name:'SaleNumberChart',component:SaleNumberChart},
    //库存量分析图表
    {path:'/SaveNumberChart',name:'SaveNumberChart',component:SaveNumberChart},
    //可销售天数分析图表
    {path:'/SaleDayChart',name:'SaleDayChart',component:SaleDayChart},

    //最低库存预警报表
    { path: '/MiniAlert', name: 'MiniAlert', component: MiniAlert},
    //最高库存预警报表
    { path: '/MaxAlert', name: 'MaxAlert', component:MaxAlert },
    //产品保质期到期预警表
    {path:'/ExpireAlert',name:'ExpireAlert',component:ExpireAlert},
  ]
})
